import request from '@/utils/request'

// 获取权限总数量
export function getPermissions() {
  return request({
    url: '/permissions/count'

  })
}

// 获取权限列表
export function getPermissionsList(params) {
  return request({
    url: '/permissions',
    params
  })
}

// 新增权限
export function addPermissions(data) {
  return request({
    url: '/permissions',
    method: 'post',
    data
  })
}
// 根据id获取权限
export function getPermissionsId(id) {
  return request({
    url: '/permissions/' + id
  })
}
// 编辑权限
export function updatePermissons(data) {
  return request({
    url: '/permissions/' + data.id,
    method: 'put',
    data
  })
}
// 删除权限
export function deletePermissions(id) {
  return request({
    url: '/permissions/' + id,
    method: 'delete'
  })
}
